package Example18;

class Animal {
    void shout() {
        System.out.println("动物叫！");
    }

    public String toString() {
        return "还是一个动物类";
    }
}

public class Example18 {
    public static void main(String[] args) {
        Animal animal = new Animal();
        System.out.println(animal.toString());
    }
}
